home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / demo / mag / amoner06.dms / amoner06.adf / Peel_Scroll.AMOS / Peel_Scroll.amosSourceCode < prev    next >
AMOS Source Code  |  1992-12-09  |  4KB  |  161 lines

  1. '--------------------------------------------------------- 
  2. ' Peel scroll by Salim Gasmi for AmoNER #6 
  3. '
  4. 'some flicker left on the interpreted version  
  5. 'but the compiled one is smooth !!!
  6. '
  7. 'E-mail adress: gasmisam@quartz.u-strasbg.fr 
  8. '           or  gasmisam@azur.u-strasbg.fr 
  9. '           or  boudjemi@turing.u-strasbg.fr (put SALIM as Subject:)   
  10. '
  11. Break Off 
  12. '
  13. '--------------------------------------------------------
  14. '-          Fonts grabing and description               -  
  15. '--------------------------------------------------------
  16. '
  17. '
  18. Unpack 6 To 0
  19. Screen Hide 
  20. SIZE_X=16
  21. SIZE_Y=16
  22. C$="abcdefghijklmnopqrstuvwxyz .,!'?:()0123456789DBMSFZCG-+//"
  23. N=Len(C$)
  24. Dim X(N),Y(N)
  25. For Y=1 To 3
  26.    For X=1 To 19
  27.       Inc CP
  28.       X(CP)=(X-1)*SIZE_X+1
  29.       Y(CP)=(Y-1)*SIZE_Y+101
  30.    Next X
  31. Next Y
  32. '
  33. '--------------------------------------------------------
  34. '-                Text implementation                   -  
  35. '--------------------------------------------------------
  36. '
  37. '
  38. T$="here is a peel scroll made for amoner !! hope you like it .... "
  39. T$=T$+"this piece of code is dedicated to michael d. cox "
  40. T$=T$+"who seems to like this little scrolly ....... "
  41. LT=Len(T$)
  42. Erase 9
  43. Reserve As Data 9,LT+1
  44. ST=Start(9)
  45. For I=1 To LT
  46.    R$=Mid$(T$,I,1)
  47.    O=Instr(C$,R$)
  48.    Poke ST+I,O
  49. Next I
  50. '
  51. '--------------------------------------------------------
  52. '-          Screens & grafiks descriptions              -  
  53. '--------------------------------------------------------
  54. '
  55. '
  56. Screen Open 2,375,250,4,0
  57. Hide 
  58. Cls 0
  59. Flash Off 
  60. Colour 1,$FFF
  61. Screen Open 1,375,250,2,0
  62. Get Palette 0
  63. Cls 0
  64. COPPER[9]
  65. Rainbow 1,1,80,190
  66. Dual Playfield 2,1
  67. Dual Priority 1,2
  68. '
  69. '--------------------------------------------------------
  70. '-               Scrolls declarations                   -  
  71. '--------------------------------------------------------
  72. '
  73. '
  74. H=20
  75. L=150
  76. XD=10
  77. YD=200
  78. Def Scroll 1,XD,YD To 375,YD+H,-1,0
  79. Def Scroll 2,XD,YD+H-L To XD+H,YD+H,0,-1
  80. Def Scroll 3,XD,YD-L+H To 350,YD-L+2*H,1,0
  81. Def Scroll 4,XD+3*L/2,YD-L/2 To XD+3*L/2+H,YD+H,0,-1
  82. Def Scroll 5,XD+L/2,YD-L/2 To XD+3*L/2+H,YD-L/2+H,-1,0
  83. Def Scroll 6,XD+L/2,YD-L/2 To XD+L/2+H,YD+H,0,1
  84. Def Scroll 7,XD+2*L,YD-L-L/3+2*H To XD+2*L+H,YD-L+2*H,0,-1
  85. Def Scroll 8,0,YD-L+2*H-L/3 To XD+2*L+H,YD-L+H*3-L/3,-1,0
  86. Def Scroll 9,110,200 To 375,220,-1,0
  87. Def Scroll 10,110,0 To 130,220,0,-1
  88. '
  89. '--------------------------------------------------------
  90. '-                   Main loop                          -  
  91. '--------------------------------------------------------
  92. '
  93. '
  94. Do 
  95.    Exit If Mouse Key=1
  96.    Inc C
  97.    If C=(SIZE_X+1)
  98.       Add P,1,1 To LT
  99.       R=Peek(ST+P)
  100.       Screen Copy 0,X(R),Y(R),X(R)+SIZE_X,Y(R)+SIZE_Y To 1,345,201
  101.       Screen Copy 1,345,201,345+SIZE_X,201+SIZE_Y To 2,345,202
  102.       C=0
  103.    End If 
  104.    For I=1 To 8
  105.       Scroll I
  106.    Next I
  107.    Screen 2
  108.    Scroll 9
  109.    Scroll 10
  110.    Screen 1
  111.    Wait Vbl 
  112. Loop 
  113. '
  114. '--------------------------------------------------------
  115. '-        This is the end (Doors/Apocalypse Now)        -  
  116. '--------------------------------------------------------
  117. '
  118. '
  119. Erase 9
  120. Copper Off 
  121. Default 
  122. Run "Amoner006:autoexec.amos"
  123. '
  124. '--------------------------------------------------------
  125. '-                  Rainbow procedure                   -  
  126. '--------------------------------------------------------
  127. '
  128. '
  129. Procedure COPPER[C0LOR]
  130.    Set Rainbow 1,C0LOR,91,"","",""
  131.    For I=0 To 15
  132.       K=3840+16*I
  133.       Rain(1,C)=K
  134.       Inc C
  135.    Next I
  136.    For I=0 To 14
  137.       K=K-256
  138.       Rain(1,C)=K
  139.       Inc C
  140.    Next I
  141.    For I=0 To 14
  142.       K=K+1
  143.       Rain(1,C)=K
  144.       Inc C
  145.    Next I
  146.    For I=0 To 14
  147.       K=K-16
  148.       Rain(1,C)=K
  149.       Inc C
  150.    Next I
  151.    For I=0 To 14
  152.       K=K+256
  153.       Rain(1,C)=K
  154.       Inc C
  155.    Next I
  156.    For I=0 To 14
  157.       K=K-1
  158.       Rain(1,C)=K
  159.       Inc C
  160.    Next I
  161. End Proc